/*
 * =====================================================================================
 *       Filename:  14.c
 *        Version:  1.0
 *        Created:  09/29/2014 10:24:23 PM
 *       Compiler:  gcc
 *         Author:  firebroo 
 * =====================================================================================
 */

#include<stdio.h>

void main(){
    int matrix[2][5] = {{1,2,3,4,5},{6,7,8,9,10}};
    printf("%p\n",&matrix[0][0]);
    printf("%p\n",&matrix[0][1]);
    printf("%p\n",&matrix[0][2]);
    printf("%p\n",&matrix[0][3]);
    printf("%p\n",&matrix[0][4]);
    printf("%p\n",&matrix[1][0]);
    printf("%p\n",&matrix[1][1]);
    printf("%p\n",&matrix[1][2]);
    printf("%p\n",&matrix[1][3]);
    printf("%p\n",&matrix[1][4]);
    printf("%d\n",*(*(matrix+1)+3));
    printf("%d\n",*(*matrix+9));
    int (*pmatrix)[5] = matrix;
    printf("%p\t%p\t%p\n",matrix,matrix[0],*matrix);
    printf("%d\t%d\t%d\t%d\t%d\n",matrix[0][0],**matrix,*matrix[0],*(matrix[1]-5),*(*(matrix+1) - 5));
    printf("%d\t%d\t%d\t%d\t%d\n",pmatrix[0][0],**pmatrix,*pmatrix[0],*(pmatrix[1]-5),*(*(pmatrix+1) - 5));
    printf("%d\t%d\t%d\n",sizeof(matrix),sizeof(matrix[0]),sizeof(matrix[0][1]));
    printf("%d\t%d\t%d\n",sizeof(pmatrix),sizeof(pmatrix[0]),sizeof(pmatrix[0][1]));
    printf("%p\t%p\n",matrix,pmatrix);
}

